<!--
  Copyright 2015, Red Hat, Inc. and individual contributors
  as indicated by the @author tags. See the copyright.txt file in the
  distribution for a full listing of individual contributors.

  This is free software; you can redistribute it and/or modify it
  under the terms of the GNU Lesser General Public License as
  published by the Free Software Foundation; either version 2.1 of
  the License, or (at your option) any later version.

  This software is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General Public
  License along with this software; if not, write to the Free
  Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  02110-1301 USA, or see the FSF site: http://www.fsf.org.
  -->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<f:view contentType="text/html"
  xmlns="http://www.w3.org/1999/xhtml"
  xmlns:f="http://java.sun.com/jsf/core">

  <html lang="#{localeSelectorAction.getLocale()}">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>

    <title>#{msgs['jsf.Zanata']}</title>

    <meta name="description" content="Open Translation for Everyone"/>
    <meta name="author" content="Red Hat"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <meta http-equiv="cleartype" content="on"/>

    <!-- Preconnect SourceSansPro via FontFace in the
        following files:
         1. app/editor/components/TransUnit/index.css
         2. app/editor/css/theme/lib/theme.css
         3. app/editor/css/base/lib/text.css
    -->
    <link rel="preconnect" href="https://fonts.gstatic.com/"
          crossorigin="anonymous" />

    <link type="image/x-icon" rel="shortcut icon"
        href="#{request.contextPath}/resources/assets/img/logo/logo.ico" />
    <link type="text/css" rel="stylesheet" href="#{frontendAssets.editorCss}"/>
    <link rel="stylesheet" type="text/css" async="async"
            href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,400italic"/>
  </head>

  <body class="new-zanata">
  <!-- Based on config in /a/index.xhtml -->
  <div id="config"
       data-app-url="#{request.contextPath}"
       data-server-url="#{request.contextPath}"
       data-api-server-url="#{request.contextPath}/rest"
       data-user="#{authenticatedAccountHome.getUser()}"
       data-permission="#{authenticatedAccountHome.getUserPermission().getJSON()}"
       data-links='{"loginUrl": "#{applicationConfigurationAction.getLoginUrl(request)}",
                     "registerUrl": "#{applicationConfigurationAction.registerUrl}"}'
       data-app-locale="#{localeSelectorAction.getLocale()}">
  </div>


    <noscript>
      <div class="l__wrapper l--push-v-1">
        <p class="message--danger" translate="translate">We're sorry, this application needs Javascript to
          run.</p>
      </div>
    </noscript>
    <script type="application/javascript">
      window.config = JSON.parse(JSON.stringify(document.getElementById('config').dataset))
    </script>

    <div id="appRoot"/>
    <script type="text/javascript" src="#{frontendAssets.runtime}" charset="utf-8"></script>
    <script type="text/javascript" src="#{frontendAssets.editorJs}" charset="utf-8"></script>
  </body>
  </html>
</f:view>
